package com.z100h.supplychain.evidence.entity;

import java.util.Date;
import java.util.List;

import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;
import com.z100h.supplychain.core.Evidence;
import com.z100h.supplychain.core.EvidenceType;
import com.z100h.supplychain.core.StockoutState;

/**
 * @author madara
 * @Title: Stockout
 * @ProjectName supplychain
 * @Description: 出库单
 * @date 2019/1/1717:59
 */
public class Stockout extends DataEntity<Stockout> implements Evidence {

	private static final long serialVersionUID = 1L;

	private String evidenceId; // 凭证id

	private String orderId; // 订单类型

	private String stockoutType; // 出库类型

	private String warehouseId;

	private String totalPlant;// 植物总量

	private String confirmTotal;// 已出库总量

	private List<String> resourceIds;

	private String state;

	private String startDate;

	private String endDate;

	private String customerId;

	private String stockroomId;

	private String customerName;

	private String customerContact;

	private String customerPhone;

	private Integer erpResAmount;

	private String level;

	private String erpState;

	private String stockoutState;

	private String evidenceState;

	private String assignor;

	private String isSupplement;

	private String isUrgent;

	private Boolean hasCode;

	private String stockroomName;

	private Date qcDate;

	public String getStockroomId() {
		return stockroomId;
	}

	public void setStockroomId(String stockroomId) {
		this.stockroomId = stockroomId;
	}

	public String getCustomerName() {
		return customerName;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getCustomerContact() {
		return customerContact;
	}

	public void setCustomerContact(String customerContact) {
		this.customerContact = customerContact;
	}

	public String getCustomerPhone() {
		return customerPhone;
	}

	public void setCustomerPhone(String customerPhone) {
		this.customerPhone = customerPhone;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		if (StringUtils.isNotBlank(state)) {
			this.state = StockoutState.get(state).getName();
		}
	}

	public String getTotalPlant() {
		return totalPlant;
	}

	public void setTotalPlant(String totalPlant) {
		this.totalPlant = totalPlant;
	}

	public String getConfirmTotal() {
		return confirmTotal;
	}

	public void setConfirmTotal(String confirmTotal) {
		this.confirmTotal = confirmTotal;
	}

	private EvidenceType evidenceType;// 凭证类型

	public EvidenceType getEvidenceType() {
		return evidenceType;
	}

	public void setEvidenceType(EvidenceType evidenceType) {
		this.evidenceType = evidenceType;
	}

	public Stockout() {
		super();
		this.setIdType(IDTYPE_AUTO);
	}

	public Stockout(String id) {
		super(id);
	}

	@Override
	@ExcelField(title = "凭证id", align = 2, sort = 7)
	public String getEvidenceId() {
		return evidenceId;
	}

	public void setEvidenceId(String evidenceId) {
		this.evidenceId = evidenceId;
	}

	@ExcelField(title = "订单类型", align = 2, sort = 8)
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@ExcelField(title = "出库类型", align = 2, sort = 9)
	public String getStockoutType() {
		return stockoutType;
	}

	public void setStockoutType(String stockoutType) {
		this.stockoutType = stockoutType;
	}

	public String getWarehouseId() {
		return warehouseId;
	}

	public void setWarehouseId(String warehouseId) {
		this.warehouseId = warehouseId;
	}

	public List<String> getResourceIds() {
		return resourceIds;
	}

	public void setResourceIds(List<String> resourceIds) {
		this.resourceIds = resourceIds;
	}

	public String getCustomerId() {
		return customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	public Integer getErpResAmount() {
		return erpResAmount;
	}

	public void setErpResAmount(Integer erpResAmount) {
		this.erpResAmount = erpResAmount;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getErpState() {
		return erpState;
	}

	public void setErpState(String erpState) {
		this.erpState = erpState;
	}

	public String getStockoutState() {
		return stockoutState;
	}

	public void setStockoutState(String stockoutState) {
		this.stockoutState = stockoutState;
	}

	public String getEvidenceState() {
		return evidenceState;
	}

	public void setEvidenceState(String evidenceState) {
		this.evidenceState = evidenceState;
	}

	public String getAssignor() {
		return assignor;
	}

	public void setAssignor(String assignor) {
		this.assignor = assignor;
	}

	public String getIsSupplement() {
		return isSupplement;
	}

	public void setIsSupplement(String isSupplement) {
		this.isSupplement = isSupplement;
	}

	public String getIsUrgent() {
		return isUrgent;
	}

	public void setIsUrgent(String isUrgent) {
		this.isUrgent = isUrgent;
	}

	public Boolean getHasCode() {
		return hasCode;
	}

	public void setHasCode(Boolean hasCode) {
		this.hasCode = hasCode;
	}

	public String getStockroomName() {
		return stockroomName;
	}

	public void setStockroomName(String stockroomName) {
		this.stockroomName = stockroomName;
	}

	public Date getQcDate() {
		return qcDate;
	}

	public void setQcDate(Date qcDate) {
		this.qcDate = qcDate;
	}

	public Stockout(String evidenceId, String stockoutType, String stockroomId, String customerId, String customerName,
			String customerContact, String customerPhone) {
		super();
		this.setIdType(IDTYPE_AUTO);
		this.evidenceId = evidenceId;
		this.stockoutType = stockoutType;
		this.customerId = customerId;
		this.customerName = customerName;
		this.customerContact = customerContact;
		this.customerPhone = customerPhone;
		this.stockroomId = stockroomId;
	}

}
